$(function(){
			
		//*********dataTable begin
		$(".dataTable").dataTable({
				"sPaginationType": "full_numbers",
				"sDom": '<"top"lfrt><"bottom"ip><"clear">',
				"oLanguage": {
					"sProcessing": "处理中...",
					"sLengthMenu": "Show _MENU_ entries",
					"sZeroRecords": "没找到记录.",
					"sInfo": "第_START_到_END_  总_TOTAL_ 记录数",
					"sInfoEmpty": "无记录",
					"sInfoFiltered": "(filtered from _MAX_ total entries)",
					"sInfoPostFix": "",
					"sSearch": "搜索",
					"oPaginate": {
						"sFirst":    "首页",
						"sPrevious": "上一页",
						"sNext":     "下一页",
						"sLast":     "最后页"
					}
				}
		});
		
		
		//*********dataTable end
		
		//*********graphTable begin
		$(".graphTable").graphTable(
				{
					series: 'columns'
				},
				{
					lines: { show: true, fill: true  },
		            //points: { show: true },
		            selection: { mode: "xy" },
		            grid: { hoverable: true, clickable: true }
		});
		
		function showTooltip(x, y, contents) {
	        $('<div id="tooltip">' + contents + '</div>').css( {
	            position: 'absolute',
	            display: 'none',
	            top: y + 5,
	            left: x + 5,
	            border: '1px solid #fdd',
	            padding: '2px',
	            'background-color': '#fee',
	            opacity: 0.80
	        }).appendTo("body").fadeIn(200);
	    }
	    
	    var previousPoint = null;
	    $(".flot-graph").bind("plothover", function (event, pos, item) {
	    
           	if (item) {
              	 if (previousPoint != item.datapoint) {
                    previousPoint = item.datapoint;
	                    
                    $("#tooltip").remove();
                    var x = item.datapoint[0],
                        y = item.datapoint[1];
                    
                    showTooltip(item.pageX, item.pageY,
                                item.series.label + " of " + x + " = " + y);
                }
            }
            else {
                $("#tooltip").remove();
                previousPoint = null;            
            }
	    });
	    
		
		//*********graphTable end
		
		$('.datepicker').datepicker({
				dateFormat: "yy-mm-dd"
		});
		
		$('.tabs').tabs();
		
		$('.treeview').treeview();
		
		$(".accordion").accordion();
			
});